<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a4j="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

	<ui:define name="body">
		<rich:panel>
			<f:facet name="header">Quiz: #{questionarioHome.instance.nome}</f:facet>
			
			<s:decorate id="dono" template="/layout/display.xhtml">
	            <ui:define name="label">Dono</ui:define>
	            <h:outputText value="#{questionarioHome.instance.usuario.nome}"/>
        	</s:decorate>
        	
        	<s:decorate id="nome" template="/layout/display.xhtml">
	            <ui:define name="label">Nome do Quiz!</ui:define>
	            <h:outputText value="#{questionarioHome.instance.nome}"/>
        	</s:decorate>
        	
        	<s:decorate id="descricao" template="/layout/display.xhtml">
	            <ui:define name="label">Descrição</ui:define>
	            <h:outputText value="#{questionarioHome.instance.descricao}"/>
        	</s:decorate>
        	
        	<s:decorate id="nivel" template="/layout/display.xhtml">
	            <ui:define name="label">Nível</ui:define>
	            <h:outputText value="#{questionarioHome.instance.nivel}"/>
        	</s:decorate>
        	
        	<s:decorate id="cliques" template="/layout/display.xhtml">
	            <ui:define name="label">Clique(s)</ui:define>
	            <h:outputText value="#{questionarioHome.instance.cliques}"/>
        	</s:decorate>
        	
        	<s:decorate id="dataCadastro" template="/layout/display.xhtml">
	            <ui:define name="label">Data de Cadastro</ui:define>
	            <h:outputText value="#{questionarioHome.instance.dataCadastro.time}"/>
        	</s:decorate>
        	
        	<div style="clear:both"/>
        	
        	<br clear="left"/>
        	
        	<rich:menuSeparator/>
        	
        	<br clear="left"/>
        	
        	<a4j:outputPanel>
        		<table>
        		<a4j:repeat value="#{questionarioHome.questao}" var="_questao">
        			<tr>
        				<td><h:outputText value="#{_questao.questao}" style="font-weight: bold;"/></td>
        				<td></td> 
        			</tr>
        			
        			<a4j:repeat value="#{_questao.resposta}" var="_resposta">
        				<tr>
	        				<td><h:outputText value="==D " styleClass="resposta"/>
	        				<h:outputText value="#{_resposta.resposta}" styleClass="resposta"/></td>
	        			</tr>
        			</a4j:repeat>
        		</a4j:repeat>
        		</table>
        	</a4j:outputPanel>
		</rich:panel>
	</ui:define>
</ui:composition>